package com.zp.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 * create schedule type information entity with properties
 * 
 * @version 1.0
 * 
 * @since 1.0
 * 
 * @author chenlijun08@gmail.com
 * 
 * @date 2014/2/22
 * 
 */
@XmlRootElement
@Entity
@Table(catalog = "zzyyp", name = "tb_schedule_type")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ScheduleType implements Serializable {

	private static final long serialVersionUID = 1L;
	private String id;
	// code of Type
	private String typeCode;
	private Date startTime;
	private Date endTime;
	private String name;
	private String status;

	@Id
	@GenericGenerator(name = "generator", strategy = "uuid")
	@GeneratedValue(generator = "generator")
	@Column(length = 32, nullable = false, name = "schedule_type_id", unique = true)
	public String getId() {
		return id;
	}

	public void setId(String userId) {
		this.id = userId;
	}

	@Column(length = 20, nullable = false, name = "schedule_type", unique = true)
	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "schedule_start_time")
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "schedule_end_time")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Column(length = 20, nullable = false, name = "schedule_name", unique = true)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(length = 1, name = "schedule_status")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}
